package com.ruoyi.mall.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mall.mapper.MallLevelMapper;
import com.ruoyi.mall.entity.MallLevel;
import com.ruoyi.mall.service.IMallLevelService;
import com.ruoyi.common.core.text.Convert;

/**
 * 会员级别Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-05-15
 */
@Service
public class MallLevelServiceImpl implements IMallLevelService 
{
    @Autowired
    private MallLevelMapper mallLevelMapper;

    /**
     * 查询会员级别
     * 
     * @param levelId 会员级别ID
     * @return 会员级别
     */
    @Override
    public MallLevel selectMallLevelById(Long levelId)
    {
        return mallLevelMapper.selectMallLevelById(levelId);
    }

    /**
     * 查询会员级别列表
     * 
     * @param mallLevel 会员级别
     * @return 会员级别
     */
    @Override
    public List<MallLevel> selectMallLevelList(MallLevel mallLevel)
    {
        return mallLevelMapper.selectMallLevelList(mallLevel);
    }

    /**
     * 新增会员级别
     * 
     * @param mallLevel 会员级别
     * @return 结果
     */
    @Override
    public int insertMallLevel(MallLevel mallLevel)
    {
        return mallLevelMapper.insertMallLevel(mallLevel);
    }

    /**
     * 修改会员级别
     * 
     * @param mallLevel 会员级别
     * @return 结果
     */
    @Override
    public int updateMallLevel(MallLevel mallLevel)
    {
        return mallLevelMapper.updateMallLevel(mallLevel);
    }

    /**
     * 删除会员级别对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteMallLevelByIds(String ids)
    {
        return mallLevelMapper.deleteMallLevelByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除会员级别信息
     * 
     * @param levelId 会员级别ID
     * @return 结果
     */
    @Override
    public int deleteMallLevelById(Long levelId)
    {
        return mallLevelMapper.deleteMallLevelById(levelId);
    }
}
